package com.m3958.firstgwt.client.place;

import com.m3958.firstgwt.client.MyPlace;
import com.m3958.firstgwt.client.types.ViewNameEnum;

public class LinkEditPlace extends MyPlace{
	
	private String parentId;
	
	private String linkId;
	
	
	public LinkEditPlace(String parendAndLinkId){
		String[] ss = parendAndLinkId.split(",");
		this.parentId = ss[0];
		if(ss.length > 1)this.linkId = ss[1];
	}
	
	public LinkEditPlace(String parentId,String linkId){
		this.parentId = parentId;
		this.linkId = linkId;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getLinkId() {
		return linkId;
	}

	public void setLinkId(String linkId) {
		this.linkId = linkId;
	}

	@Override
	public String getToken() {
		return ViewNameEnum.LINK_EDIT.toString().toLowerCase() + "/" + parentId + "," + linkId;
	}

}
